-
Notifications
You must be signed in to change notification settings - Fork 1
Add Claude Agent SDK templates and update to kernel.sh domain #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adds a new TypeScript template that integrates the Claude Agent SDK with Kernel's browser automation capabilities. The template: - Creates a Kernel browser and exposes Playwright execution via MCP - Allows Claude to autonomously browse the web to complete tasks - Supports both local CLI execution and Kernel app deployment - Auto-installs Claude Code on Kernel VMs during invocation - Uses allowedTools for permission-free headless operation
Ports the TypeScript Claude Agent SDK template to Python. The template: - Uses ClaudeSDKClient for browser automation with MCP tools - Creates a Kernel browser and exposes Playwright execution via MCP - Supports both local CLI execution (uv run main.py) and Kernel deployment - Auto-installs Claude Code on Kernel VMs during invocation - Uses claude-agent-sdk and kernel Python packages The template follows the same conventions as other Python templates in the repo, including pyproject.toml, uv for dependency management, and dual execution mode (local vs Kernel app).
Updates the README.md to document the new claude-agent-sdk template: - Added to the templates list in the --template flag description - Added example usage in the "Create a new app" examples section
Updates all website and documentation URLs to use the new domain: - onkernel.com -> www.kernel.sh - dashboard.onkernel.com -> dashboard.kernel.sh - docs.onkernel.com -> www.kernel.sh/docs Note: API/infrastructure URLs (api.onkernel.com, auth.onkernel.com, mcp.onkernel.com) are unchanged as they may require separate migration.
- Change [email protected] to [email protected] in .goreleaser.yaml - Remove outdated "kernel logs -f" instructions from templates since kernel invoke now streams logs automatically - Update comments referencing manual log watching
| os.environ["PATH"] = f"{homedir}/.local/bin:{current_path}" | ||
| print("Added ~/.local/bin to PATH") | ||
|
|
||
| print("Claude Code installed successfully") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing return code check for installation command
Medium Severity
The install_claude_code function runs subprocess.run without check=True and never validates result.returncode. If the Claude Code installation command fails (network error, script failure, etc.), the function ignores the failure, prints "Claude Code installed successfully", and returns normally. The agent then fails later with a confusing error when it tries to use Claude Code that wasn't actually installed. The TypeScript version correctly throws on non-zero exit codes via execAsync.
- Update go.mod module path to github.com/kernel/cli - Update all Go import paths - Update GitHub release API URL - Update npm package install commands - Update .goreleaser.yaml repository references
Include ts-claude-agent-sdk and py-claude-agent-sdk in all sections of the QA testing workflow. Updates template count from 13 to 15.
dprevoznik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - added one commit @rgarcia to add the new templates to the /qa command file. Once this is live, I can update the docs.
Summary
onkernel.comtokernel.sh(new domain)kernel logs -finstructions sincekernel invokenow streams logs automaticallyNew Templates
TypeScript (
pkg/templates/typescript/claude-agent-sdk/)@anthropic-ai/claude-agent-sdkwith@onkernel/sdkpnpm exec tsx index.ts "task") and Kernel deploymentPython (
pkg/templates/python/claude-agent-sdk/)claude-agent-sdkwithkernelPython SDKuv run main.py "task") and Kernel deploymentOther Changes
onkernel.com,www.onkernel.com,dashboard.onkernel.com,docs.onkernel.comreferences to usekernel.sh[email protected]to[email protected]kernel logs <app> -fcomments from all templates since logs now stream automatically withkernel invokeTest Plan
pnpm exec tsx index.ts "Go to news.ycombinator.com and get top 3 stories"uv run main.py "Go to news.ycombinator.com and get top 3 stories"Note
Introduces Claude Agent SDK samples and aligns repo/docs with the new Kernel domain.
claude-agent-sdktemplates for both TypeScript and Python, including MCP tool to execute Playwright against Kernel browsers, local run scripts, and Kernel deploy/invoke actionsREADME.md, template READMEs, and code comments to replaceonkernel.comwithkernel.sh; removes outdatedkernel logs -fnotes sincekernel invokestreams logsts-claude-agent-sdkandpy-claude-agent-sdk; increases app count in test matrixgithub.com/onkernel/clitogithub.com/kernel/cli; adjustsgoreleaserorg/URLs and author emailpkg/create/templates.go) to include the new template, entry points, env requirements, and invoke commandsWritten by Cursor Bugbot for commit 67aed22. This will update automatically on new commits. Configure here.